package com.wsy.filter;


import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import org.springframework.stereotype.Component;

//将自定义局部过滤器添加到过滤工厂中,并注册成spring的bean对象
@Component
public class UnameCheckGatewayFilterFactory extends AbstractGatewayFilterFactory {

    //将自定义的过滤器加入到gateway过滤工厂中
    @Override
    public GatewayFilter apply(Object config) {
        return new UnameCheckGatewayFilter();
    }


}
